Crate ockam_core
source ·Expand description
This crate contains the core types of the [Ockam][main-ockam-crate-link] library and is intended for use by crates that provide features and add-ons to the main [Ockam][main-ockam-crate-link] library.
The main [Ockam][main-ockam-crate-link] crate re-exports types defined in this crate.
Crate Features
The ockam_core
crate has a Cargo feature named "std"
that is enabled by
default. In order to use this crate in a no_std
context this feature can
be disabled as follows
[dependencies]
ockam_core = { version = "<current version>" , default-features = false }
Please note that Cargo features are unioned across the entire dependency
graph of a project. If any other crate you depend on has not opted out of
ockam_core
default features, Cargo will build ockam_core
with the std
feature enabled whether or not your direct dependency on ockam_core
has default-features = false
.
Re-exports
pub use access_control::*;
Modules
- Access control
- A facade around the various collections and primitives needed to support
std
,no_std + alloc
orno_std
targets. - Debugger
- Environmental variables
- A module to export the error code in a meaningful way
- Flow Control
- Encoding
Macros
Structs
- A generic address type.
- An error which is returned when address parsing from string fails.
- A passthrough marker message type.
- A new type around
Cow<'_, [u8]>
that borrows from input. - A new type around
Cow<'_, str>
that borrows from input. - The type of errors returned by Ockam functions.
- Contains metadata that will only be routed locally within the local Ockam Node.
- A message type that is routed locally within a single node.
- A message type that is not subject to any encoding or decoding.
- A user-defined protocol identifier.
- A message addressed to the relay responsible for delivery of the wrapped
LocalMessage
- A full route to a peer.
- A utility type for building and manipulating routes.
- A message wrapper that provides message route information.
- A generic transport message type.
- The transport type of an
Address
. - Unsigned integer implementation that supports serde_bare serialization as a 64 bit
uint
type.
Enums
- Enum to store the cause of an address parsing failure.
- A routing specific error type.
Constants
- The local transport type.
Traits
- Clone trait for async structs.
- Decode a slice.
- Encode the type into an
Encoded
type. - A user defined message that can be serialised and deserialized.
- Defines an interface for Ockam Workers that need to continuously perform background operations.
- Defines the core interface shared by all Ockam Workers.
Functions
- Produces Ok(true) to avoid an ambiguous reading from using the unadorned value in auth code.
- Produces Ok(false) to avoid an ambiguous reading from using the unadorned value in auth code.
Type Aliases
- Alias of the type used for encoded data.
Attribute Macros
- Mark an Ockam Processor implementation.
- Mark an Ockam Worker implementation.
Derive Macros
- Implements the
AsyncTryClone
trait for a type. - Implements the
Message
trait for a type.